package com.friend.config;

import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * <p></p>
 *
 * @author jiuhua.xu
 * @version 1.0
 * @since JDK 1.8
 */
@Configuration
public class ApplicationContextConfig {

    @Bean
    public RestTemplate getRestTemplate() {
//        return new RestTemplate();
        return new RestTemplateBuilder()
//                .basicAuthentication("clientId", "secret")
                .basicAuthentication("bsApp", "bsApp")
                .build();
    }

}
